import { lazy } from 'react'
const PickFolder = lazy(()=>import('#cpt/form-element/pick-folder'))
/* -------------------------------------------------------- Mongodb 备份 -- */
const Index = ({ backup }) => {
	return {
		modal:{
			title: <span>备份全部数据库</span>,
			width 	: '35%',
		},
		form: {
			labelWidth: 's6',
			api: 'mysql/backup_all_mongo',
			infoApi : false,
			param: { path:backup, dev: window.$config.isNative, name:'mongo', pwd:'123456'},
			data: [
				{ label: '备份名称', name:'name', r:1 },
				{ label: '密码', name:'pwd', type:'password', r:1 },
				{ label: '文件夹路径',  name: 'path', slot: v => <PickFolder {...v}/>, api:'/file/pick_folder',r:1},
			]
		}
	}
}
export default Index